<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form rendered="#{loginBacking.viewSystemUser}">
                <p:panel header="User Details">
                    <h:panelGrid columns="2">
                        <h:outputText value="User Account ID: "/>
                        <h:outputText value="#{systemUserEntityController.selected.id}" title="#{bundle.ViewSystemUserEntityTitle_id}"/>

                        <h:outputText value="Username: "/>
                        <h:outputText value="#{systemUserEntityController.selected.name}" title="#{bundle.ViewSystemUserEntityTitle_name}"/>

                        <h:outputText value="Title: "/>
                        <h:outputText value="#{systemUserEntityController.selected.title}" title="#{bundle.ViewSystemUserEntityTitle_title}"/>

                        <h:outputText value="First Name: "/>
                        <h:outputText value="#{systemUserEntityController.selected.firstName}" title="#{bundle.ViewSystemUserEntityTitle_firstName}"/>

                        <h:outputText value="Last Name: "/>
                        <h:outputText value="#{systemUserEntityController.selected.lastName}" title="#{bundle.ViewSystemUserEntityTitle_lastName}"/>

                        <h:outputText value="Department: "/>
                        <h:outputText value="#{systemUserEntityController.selected.department.name}" title="#{bundle.ViewSystemUserEntityTitle_department}"/>
                    </h:panelGrid>
                </p:panel>
                <br />
                
                <p:panel header="Contact Information">
                    <h:panelGrid columns="2">

                        <h:outputText value="#{bundle.ViewContactEntityLabel_contactNumber}"/>
                        <h:outputText value="#{systemUserEntityController.selected.contact.contactNumber}" title="#{bundle.ViewContactEntityTitle_contactNumber}"/>

                        <h:outputText value="#{bundle.ViewContactEntityLabel_email}"/>
                        <h:outputText value="#{systemUserEntityController.selected.contact.email}" title="#{bundle.ViewContactEntityTitle_email}"/>                    

                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_createdAt}"/>
                        <h:outputText value="#{systemUserEntityController.selected.createdAt.toString()}" title="#{bundle.ViewSystemUserEntityTitle_createdAt}">

                        </h:outputText>
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_createdBy}"/>
                        <h:outputText value="#{systemUserEntityController.selected.createdBy.name}" title="#{bundle.ViewSystemUserEntityTitle_createdBy}"/>
                        
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_lastModifiedAt}"/>
                        <h:outputText value="#{systemUserEntityController.selected.lastModifiedAt.toString()}" title="#{bundle.ViewSystemUserEntityTitle_lastModifiedAt}">
                        </h:outputText>
                        
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_lastModifiedBy}"/>
                        <h:outputText value="#{systemUserEntityController.selected.lastModifiedBy.name}" title="#{bundle.ViewSystemUserEntityTitle_lastModifiedBy}"/>
                    </h:panelGrid>
                </p:panel>
                <br />
                
                <ui:include src="/entities/addressEntity/ListAddress.xhtml"/>
                <br />
                
                <p:panel header="Meta Information">
                    <h:panelGrid columns="2">               

                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_createdAt}"/>
                        <h:outputText value="#{systemUserEntityController.selected.createdAt.toString()}" title="#{bundle.ViewSystemUserEntityTitle_createdAt}">

                        </h:outputText>
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_createdBy}"/>
                        <h:outputText value="#{systemUserEntityController.selected.createdBy.name}" title="#{bundle.ViewSystemUserEntityTitle_createdBy}"/>
                        
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_lastModifiedAt}"/>
                        <h:outputText value="#{systemUserEntityController.selected.lastModifiedAt.toString()}" title="#{bundle.ViewSystemUserEntityTitle_lastModifiedAt}">
                        </h:outputText>
                        
                        <h:outputText value="#{bundle.ViewSystemUserEntityLabel_lastModifiedBy}"/>
                        <h:outputText value="#{systemUserEntityController.selected.lastModifiedBy.name}" title="#{bundle.ViewSystemUserEntityTitle_lastModifiedBy}"/>
                    </h:panelGrid>
                </p:panel>
                <br />
                
                <h:commandButton action="#{systemUserEntityController.prepareEdit}" value="#{bundle.ViewSystemUserEntityEditLink}"/>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
